home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 89 / maccd 89.iso / updates / iView MediaPro / iView MediaPro ƒ.sit / iView MediaPro ƒ / iView MediaPro 1.4 / Script Examples / _Command Samples / _Command Samples
Encoding:
Text File  |  2001-09-12  |  3.0 KB  |  101 lines  |  [TEXT/ToyS]

  1. tell application "iView MediaPro"
  2.     
  3.     (* new window *)
  4.     -- new window
  5.     
  6.     (* open *)
  7.     -- NOTE: 
  8.     -- protected catalogs will not open unless you provide a password
  9.     -- otherwise the script will produce an error
  10.     
  11.     -- open alias "my Disk:"
  12.     -- open alias "my Disk:my Image"
  13.     -- open alias "my Disk:my iView catalog"
  14.     -- open alias "my Disk:my iView catalog" with password "my password"
  15.     -- open (choose file) -- opens a single catalog file, or adds an image to a catalog
  16.     -- open (choose folder) -- import a single folder or volume to a catalog
  17.     
  18.     
  19.     (* close *)
  20.     -- NOTE: 
  21.     -- closing opened windows with saving will only save modified windows that already have a catalog
  22.     -- otherwise changes are ignored. to make sure a window has a catalog check that it's 
  23.     -- path is not empty
  24.     
  25.     -- close window 1 with saving
  26.     -- close every window
  27.     
  28.     
  29.     (* save *)
  30.     -- NOTE 1:
  31.     -- saving opened windows will only work for windows that already have a catalog
  32.     -- otherwise an error is returned, in which case you have to use the "in" parameter
  33.     -- to specify a file
  34.     -- NOTE 2
  35.     -- the file parameter is ignored when you try to save multiple windows
  36.     
  37.     -- save window 1
  38.     -- save window 1 in file "mac os:test 1"
  39.     
  40.     
  41.     (* print *)
  42.     -- NOTE:
  43.     -- printing uses the currently active view and the print settings for that view
  44.     -- at the time the catalog was last saved.
  45.     
  46.     -- set view of window 1 to content view
  47.     -- print window 1
  48.     
  49.     
  50.     (* quit - see notes on close *)
  51.     -- quit with saving
  52.     
  53.     
  54.     (* select - see notes on close *)
  55.     -- select window 2
  56.     -- select every object of every window
  57.     
  58.     
  59.     (* move *)
  60.     -- tell window 1
  61.     -- move object 3 to the end
  62.     -- move (every object whose name contains "clio") to the beginning
  63.     -- move object 3 to before object 7
  64.     -- move object 1 to after object 2 of window 2
  65.     -- move object 1 to after object 3 of window 2
  66.     -- move object 1 to beginning of window 2
  67.     -- move object 1 to end of window 2
  68.     -- end tell
  69.     -- move (every object whose name contains "clio") of window "bimbi" to the beginning of window "catalog #1"
  70.     
  71.     (* run slide show *)
  72.     -- run slide show of window 1
  73.     
  74.     
  75.     (* export annotations *)
  76.     -- tell (every object whose media type is image)
  77.     --    export annotations with do resource fork and do data fork
  78.     -- end tell
  79.     
  80.     
  81.     (* make/exports *)
  82.     -- make HTML gallery with options "my defaults" saving in alias "my disk:my folder:" -- folder
  83.     -- make TEXT table with options "my defaults" saving in file "my disk:my file" -- file
  84.     
  85.     -- here is a complete case:
  86.     -- tell window 1
  87.     --    try
  88.     --        with timeout of 3600 seconds -- allow 1 hour for the export (this must be a big catalog!)
  89.     --            make HTML gallery with options "my defaults" saving in alias "Media:temp folder"
  90.     --            make TEXT data table with options "my defaults" saving in alias "Media:temp folder"
  91.     --        end timeout
  92.     --    on error error_message number error_number
  93.     --        display dialog ("Error number: " & (error_number as text)) buttons {"OK"} default button 1 giving up after 5
  94.     --    end try
  95.     -- end tell
  96.     
  97.     
  98.     -- tell window 1
  99.     --    convert images with options "JPEG black & white" saving in alias "Media:temp folder:"
  100.     -- end tell
  101. end tell